package com.jhgsys.internal.sypq.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jhgsys.internal.common.converter.TimeConverter;
import com.jhgsys.internal.common.entity.BaseEntity;

import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.Date;

import com.wuwenze.poi.annotation.ExcelField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;


/**
 * 项目设置 Entity
 *
 * @author ganjun
 * @date 2024-11-12 10:58:48
 */
@Data
@TableName("sypq_project")
public class SypqProject extends BaseEntity implements Serializable {

    /**
     * 项目编码,编码规则：PJ+年+月+四位序列号
     */
    @TableId(value = "project_code", type = IdType.ASSIGN_UUID)
    @Size(max = 32, message = "{noMoreThan}")
    @ExcelField(value = "项目编码")
    private String projectCode;

   // @ExcelField(value = "状态", writeConverterExp = "0=正常,1=暂停")
    /**
     * 项目名称
     */
    @TableField("project_name")
    @NotBlank(message = "{required}")
    @Size(max = 90, message = "{noMoreThan}")
    @ExcelField(value = "项目名称")
    private String projectName;



    /**
     * 项目审批人,userid
     */
    @TableField("auditorid")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    private String auditorid;

    /**
     * 客户编码
     */
    @TableField("cust_code")
    @NotBlank(message = "{required}")
    @Size(max = 32, message = "{noMoreThan}")
    @ExcelField(value = "客户编码")
    private String custCode;

    @ExcelField(value = "联系人")
    @Schema(description = "联系人")
    @TableField("contact")
    private String contact;

    @ExcelField(value = "联系方式")
    @Schema(description = "联系方式")
    @TableField("telephone")
    private String telephone;

    /**
     * 项目状态,数据字典PROJECT_STATUS,4:待排期,5:已排期,6:试验中,7:已完成,8:已终止
     */
    @TableField("status")
    @NotNull(message = "{required}")
    private Integer status;

    /**
     * 试验要求
     */
    @TableField("test_demand")
    @Size(max = 4000, message = "{noMoreThan}")
    @ExcelField(value = "试验要求")
    private String testDemand;

    /**
     * 期望开始时间
     */
    @TableField("expect_startdate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "期望开始时间", writeConverter = TimeConverter.class)
    private Date expectStartdate;

    /**
     * 期望结束时间
     */
    @TableField("expect_enddate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "期望结束时间", writeConverter = TimeConverter.class)
    private Date expectEnddate;

    /**
     * 计划开始时间
     */
    @TableField("plan_startdate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "计划开始时间", writeConverter = TimeConverter.class)
    private Date planStartdate;

    /**
     * 计划结束时间
     */
    @TableField("plan_enddate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "计划结束时间", writeConverter = TimeConverter.class)
    private Date planEnddate;

    /**
     * 实际开始时间
     */
    @TableField("actual_startdate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "实际开始时间", writeConverter = TimeConverter.class)
    private Date actualStartdate;

    /**
     * 实际结束时间
     */
    @TableField("actual_enddate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @ExcelField(value = "实际结束时间", writeConverter = TimeConverter.class)
    private Date actualEnddate;

    /**
     * 审批状态,数据字典APPROVE_STATUS,1:草稿,2:待审核,3:已驳回,4:已通过
     */
    @TableField("approve_status")
    private Integer approveStatus;

    @TableField("fileinfo")
    @Size(max = 255, message = "{noMoreThan}")
    private String fileinfo;
}